<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>欢迎来到Roud的个人博客</title>
    <meta http-equiv="refresh" content="6;url=seePC.html">
    <style>
        *{
            padding:0;
            margin:0;
        }
        body{
            position: relative;
            background-color:rgb(0, 0, 0);
            min-height:100vh;
        }
        #box{
            position:absolute;
            left: 50%;
            top: 50%;
            /* 不用transform使其达到中心，因为会和animation的transform冲突！ */
            
        }
        .box1{
            margin-top: -80px;
            margin-left: -80px;
            width: 160px;
            height: 160px;
            border:3px solid transparent;
            border-top-color: rgb(31, 11, 122);
            border-radius: 50%;
            animation: a 1.5s 0.2s infinite;
        }
        .box2{
            margin-top: -70px;
            margin-left: -70px;
            width: 140px;
            height: 140px;
            border:3px solid transparent;
            border-top-color: rgb(25, 143, 94);
            border-radius: 50%;
            animation: a 1.5s 0.1s infinite;
           
        }
        .box3{
            margin-top: -60px;
            margin-left: -60px;
            width: 120px;
            height: 120px;
            border:3px solid transparent;
            border-top-color: rgb(143, 25, 60);
            border-radius: 50%;
            animation: a 1.5s infinite;
        }
        #text{
            height: 100px;
            width: 100px;
            position: absolute;
            left: 50%;
            top:50%;
            transform: translate(-50%,-50%);
            color:white;
            text-align: center;
            line-height:100px;
        }
        @keyframes a{
            0%{
                transform: rotate(0);
            }100%{
                transform: rotate(360deg);
            }
        }
    </style>
</head>
<body>
    <div id="box" class="box1"></div>
    <div id="box" class="box2"></div>
    <div id="box" class="box3"></div>
    <div id="text"></div>
    <script>
        var flag=0;
        var text=document.querySelector("#text");
        function f1(){
            arr=["加载中.  ","加载中.. ","加载中..."];
            var newText=arr[flag];
            text.innerHTML=newText;
            flag++;
            if(flag==3){
                flag=0;
            }
        }
        setInterval(f1,1000);
    </script>
</body>

</html>